package com.asc.matchers {
import org.hamcrest.Description;
import org.hamcrest.Matcher;

/**
 * 
 */
public class StrictEqualityMatcher implements Matcher {
  private var _item:*
  public function StrictEqualityMatcher(_item:*) {
    this._item = _item;
  }


  public function describeTo(description:Description):void {
    description.appendText("Ensure two items have the same type and value (structural equality)");
  }

  public function describeMismatch(item:Object, mismatchDescription:Description):void {
    mismatchDescription.appendText(
      "["  + _item + "] " +
       " is not equal (===) to " +
       "[" + item + "]"
    )
  }

  public function matches(item:Object):Boolean {
    return _item === item;
  }
}
}